/*
* by mingjin
 */
var canvansbar = document.getElementById('barGraph');
var height = document.body.clientHeight*0.8;
var width = document.body.clientWidth*0.93;
canvansbar.style.height = height + "px";
canvansbar.style.width = width + "px";
//柱状图
var myChart = echarts.init(canvansbar);
myChart.setOption({
	color: ['#6495ED'],
    title: {
        text: '班次统计',
        x:'center',
        
    },
    tooltip: {},
    legend: {
        data:[]
    },
    xAxis: {
        data: []
    },
    yAxis: {
        type: 'value',
        axisLabel: {
            formatter: '{value} 次'
        }
    },
    series: [{
    	
            name:'班次(次)',
            type: 'bar',
            data:[],
            markPoint: {
                data: [
                    {type: 'max', name: '最大值'},
                    {type: 'min', name: '最小值'}
                ]
            },
            markLine: {
                data: [
                    {type: 'average', name: '平均值'}
                ]
            }
        }
        
      
    ]
});
//饼状图
var canvanspie = document.getElementById('pieGraph');
canvanspie.style.height = height + "px";
canvanspie.style.width = width + "px";
var pieChart = echarts.init(canvanspie);
pieChart.setOption({
	title : {
        text: '班次统计',
        x:'center'
    },
    tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
    },
    legend: {
        orient: 'vertical',
        left: 'left',
        data: []
    },
    calculable : true,
    series : [
        {
            name: '班次(次)',
            type: 'pie',
            radius : '55%',
            center: ['50%', '60%'],
            data:[ ],
            itemStyle: {
                emphasis: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        }
    ]
});
//折线图
var canvansline = document.getElementById('lineGraph');
canvansline.style.height = height + "px";
canvansline.style.width = width + "px";
var lineChart = echarts.init(canvansline);
lineChart.setOption({
	    color: ['#6495ED'],
	    title: {
		    text: '班次统计',
	        x:'center'    
	    },
	    tooltip: {
	        trigger: 'axis'
	    },
	    
	    
	    xAxis:  {
	        type: 'category',
	        boundaryGap: false,
	        data: []
	    },
	    yAxis: {
	        type: 'value',
	        axisLabel: {
	            formatter: '{value} 次'
	        }
	    },
	    series: [
	        {
	            name:'班次(次)',
	            type:'line',
	            data:[],
	            
	        }
	    ]
});